@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
                <div class="panel-heading">修改密码</div>

                <div class="panel-body">
                    <form class="form-horizontal" role="form" method="POST" action="{{ url('/passwordupdate') }}">
                        {{ csrf_field() }}

                            @if (session('msg'))
                            <div class="alert alert-info">
                                {{ session('msg') }}
                               <!--  <ul>
        
                                        <li></li>
                                   
                                </ul> -->
                            </div>
                        @endif

                        <div class="form-group{{ $errors->has('oldpwd') ? ' has-error' : '' }}">
                            <label for="oldpwd" class="col-md-4 sr-only control-label">原密码</label>

                            <div class="col-md-6">
                                <input id="oldpwd" type="password" placeholder="原密码" class="form-control" name="oldpwd" value="{{ $oldpwd or old('oldpwd') }}">

                                @if ($errors->has('oldpwd'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('oldpwd') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        
                        <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
                            <label for="password" class="col-md-4 sr-only control-label">密码</label>

                            <div class="col-md-6">
                                <input id="password" type="password" placeholder="密码" class="form-control" name="password">

                                @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
                            <label for="password-confirm" class="col-md-4 sr-only control-label">确认密码</label>
                            <div class="col-md-6">
                                <input id="password-confirm" placeholder="确认密码" type="password" class="form-control" name="password_confirmation">

                                @if ($errors->has('password_confirmation'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password_confirmation') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                       

                        <script src="//captcha.luosimao.com/static/dist/api.js"></script>
                        <div class="form-group">
                            <div class="col-md-6 col-md-offset-4">
                                <button type="submit" class="btn btn-primary btn-block">
                                    <i class="fa fa-btn fa-refresh"></i> 确认修改
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
